package come.whvc

object Test3 {
  def main(args: Array[String]): Unit = {
    val list = List(1, 2, 3, 4)
    val anotherList = list.map(sumOne)
    println(anotherList)
  }

  def sumOne(num: Int) = {
    num + 1
  }

  val words = List("apple", "cat", "dog", "banana", "hi", "scala")
  val anotherList = words.map(big)
  println(anotherList)

  def big(word: String): String = {
    word.toUpperCase
  }
}
